﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;

namespace God.ShoppingWebApi.Entities
{
    public class CommodInfo:AuditedEntity<Guid>
    {
        /// <summary>
        /// 商品名称
        /// </summary>
        public string CommodityName { get; set; }
        /// <summary>
        /// 商品价格
        /// </summary>
        public decimal CommoditySalePrice { get; set; }
        /// <summary>
        /// 商品描述
        /// </summary>
        public string CommodityDetails { get; set; }
        /// <summary>
        /// 商品图片
        /// </summary>
        public string CommodityImg { get; set; }
        /// <summary>
        /// 点赞评论数
        /// </summary>
        public int CommentCount { get; set; }
        /// <summary>
        /// 商品销量
        /// </summary>
        public int CommoditySaleNum { get; set; }
        /// <summary>
        /// 商品浏览量
        /// </summary>
        public int CommodityBorwseNum { get; set; }

        public CommodInfo()
        {

        }
        public CommodInfo(Guid cid, string commodName, decimal commodPrice, string commodDetails,string commodImg, int commtCount, int commodSaleNum, int commodNum, Guid? lastfierId)
        {
            Id = cid;
            CommodityName = commodName;
            CommoditySalePrice = commodPrice;
            CommodityDetails = commodDetails;
            CommodityImg = commodImg;
            CommentCount = commtCount;
            CommoditySaleNum = commodSaleNum;
            CommodityBorwseNum = commodNum;
            LastModificationTime=DateTime.Now;
            CreationTime=DateTime.Now;
            CreatorId= lastfierId;
            LastModifierId = lastfierId;
        }
    }
}
